//
//  VideoListItemView.swift
//  TestConcurreces
//
//  Created by rolodestar on 2025/6/16.
//

import SwiftUI

struct VideoListItemView: View {
    var video: BeautyModel
    var body: some View {
        VStack {
            if(video.localUrl == nil){
                Text("网络视频\n\(video.id.uuidString)")
                    .background(Color.gray.opacity(0.2)) // 网络视频背景色
            }else{
                Text("本地视频\n\(video.id.uuidString)")
                    .background(Color.green.opacity(0.2)) // 本地视频背景色
            }
        }.font(.body)
            .foregroundStyle(.primary)
            .lineLimit(2)
            .frame(minWidth: 0, maxWidth: .infinity, alignment: .leading) // 确保背景框宽度一致
            .padding(8)
            .cornerRadius(10)
    }
}

#Preview {
    VideoListItemView(video: BeautyModel.debugVideo)
}
